package com.simulation;

class TPhysicalPro {
	static double SaturatedWaterVaporP(double t) {
		double p;
	    /* murray (1967) formulation */
	    if ((t-273.16) >= 0.0)
	    {
	       //p = 610.78*exp((t-273.16)*17.2694/((t-273.16)+237.3));
	       p = 610.78*Math.exp((t-273.16)/((t-273.16)+238.3)*17.2694);
	    }
	    else
	    {

	       p = Math.exp(-6140.4/t+28.916);
	    }

	    return p; //pa-->hPa
	};
    static double WaterVaporConcentration(double t) {
    	double c;
    	c = 216.5* SaturatedWaterVaporP(t)*1e-5/t;
    	return c*1e-3;	//Kg/m^3 -->g/cm^3
    };
}
